<!DOCTYPE html>
<html>
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>列表</title>
    <head th:include="includes :: header"></head>
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="ibox float-e-margins">
        <div class="ibox-title">
            <h5>列表</h5>
        </div>
        <div class="ibox-content">
            <div class="panel panel-default">
                <div class="panel-heading">
                    查询条件
                </div>
                <div class="panel-body form-group" style="margin-bottom:0px;">
					<div class="col-sm-1" style="width: 120px;margin-left: 100px" >
                        <button class="btn btn-primary" id="search_btn" style="width: 100px">查询</button>
                    </div>
                </div>
                <div class="panel-body form-group" style="margin-bottom:0px;">
                    <table id="mytab" name="mytab" class="table table-hover"></table>
                    <div id="toolbar" class="btn-group pull-right" style="margin-right: 20px;">

                        <button id="btn_delete" shiro:hasPermission="collectionBook:batchRemove"  onclick="batchRemove()"  type="button" class="btn btn-default" style="display: block;">
                            <span class="glyphicon glyphicon-remove" aria-hidden="true" ></span>批量删除
                        </button>
                        <button id="btn_add" type="button" shiro:hasPermission="collectionBook:add" class="btn btn-default" data-toggle="modal" data-target="#webAdd">
                            <span class="glyphicon glyphicon-plus" aria-hidden="true" ></span>新增
                        </button>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="modal fade" id="webAdd" tabindex="-1" role="dialog" aria-labelledby="webAddLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h4 class="modal-title" id="webAddTitle">
                    新增
                </h4>
            </div>
            <form class="form-horizontal"  id="formadd">
                <div class="modal-body">
																													<div class="form-group">
								<label class="col-sm-3 control-label">标题：</label>
								<div class="col-sm-8">
									<input  id="title" name="title"  type="text" class="form-control" required="" aria-required="true">
								</div>
							</div>
																								<div class="form-group">
								<label class="col-sm-3 control-label">出版社：</label>
								<div class="col-sm-8">
									<input  id="publisher" name="publisher"  type="text" class="form-control" required="" aria-required="true">
								</div>
							</div>
																								<div class="form-group">
								<label class="col-sm-3 control-label">出版时间：</label>
								<div class="col-sm-8">
									<input  id="publishDate" name="publishDate"  type="text" class="form-control" required="" aria-required="true">
								</div>
							</div>
																								<div class="form-group">
								<label class="col-sm-3 control-label">作者：</label>
								<div class="col-sm-8">
									<input  id="author" name="author"  type="text" class="form-control" required="" aria-required="true">
								</div>
							</div>
																								<div class="form-group">
								<label class="col-sm-3 control-label">isbn号：</label>
								<div class="col-sm-8">
									<input  id="isbn" name="isbn"  type="text" class="form-control" required="" aria-required="true">
								</div>
							</div>
																								<div class="form-group">
								<label class="col-sm-3 control-label">索书号：</label>
								<div class="col-sm-8">
									<input  id="callno" name="callno"  type="text" class="form-control" required="" aria-required="true">
								</div>
							</div>
																								<div class="form-group">
								<label class="col-sm-3 control-label">分类号：</label>
								<div class="col-sm-8">
									<input  id="classno" name="classno"  type="text" class="form-control" required="" aria-required="true">
								</div>
							</div>
																								<div class="form-group">
								<label class="col-sm-3 control-label">馆藏数目：</label>
								<div class="col-sm-8">
									<input  id="assetCount" name="assetCount"  type="text" class="form-control" required="" aria-required="true">
								</div>
							</div>
																								<div class="form-group">
								<label class="col-sm-3 control-label">书目metaid：</label>
								<div class="col-sm-8">
									<input  id="metaid" name="metaid"  type="text" class="form-control" required="" aria-required="true">
								</div>
							</div>
																								<div class="form-group">
								<label class="col-sm-3 control-label">书目metatable：</label>
								<div class="col-sm-8">
									<input  id="metatable" name="metatable"  type="text" class="form-control" required="" aria-required="true">
								</div>
							</div>
																								<div class="form-group">
								<label class="col-sm-3 control-label">原分馆：</label>
								<div class="col-sm-8">
									<input  id="sublib" name="sublib"  type="text" class="form-control" required="" aria-required="true">
								</div>
							</div>
																								<div class="form-group">
								<label class="col-sm-3 control-label">原馆藏地点：</label>
								<div class="col-sm-8">
									<input  id="local" name="local"  type="text" class="form-control" required="" aria-required="true">
								</div>
							</div>
																								<div class="form-group">
								<label class="col-sm-3 control-label">当前分馆：</label>
								<div class="col-sm-8">
									<input  id="cursublib" name="cursublib"  type="text" class="form-control" required="" aria-required="true">
								</div>
							</div>
																								<div class="form-group">
								<label class="col-sm-3 control-label">当前馆藏地点：</label>
								<div class="col-sm-8">
									<input  id="curlocal" name="curlocal"  type="text" class="form-control" required="" aria-required="true">
								</div>
							</div>
																								<div class="form-group">
								<label class="col-sm-3 control-label">价格（单位：分）：</label>
								<div class="col-sm-8">
									<input  id="price" name="price"  type="text" class="form-control" required="" aria-required="true">
								</div>
							</div>
											                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭
                    </button>
                    <button type="submit" id="add" class="btn btn-primary">
                        确认新增
                    </button>
                </div>
            </form>
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>
<input type="hidden" value=""  id="deleteId"/>
<div class="modal fade" id="updateStatus" tabindex="-1" role="dialog" aria-labelledby="webAddLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h4 class="modal-title" >
                    批量修改状态
                </h4>
            </div>
            <form class="form-horizontal" method="post" id="update_status">
                <div class="modal-body">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">状态：</label>
                        <div class="col-sm-8">
                            <select class="form-control"  id="status" required name="status">
                                <option value="0">启用</option>
                                <option value="1">停用</option>
                            </select>
                        </div>
                        <input id="statusId" type="hidden" name="manyId" />
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭
                    </button>
                    <button type="button" id="updateSta" class="btn btn-primary" data-dismiss="modal">
                        确认修改
                    </button>
                </div>
            </form>
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h4 class="modal-title" id="myModalLabel">
                    修改
                </h4>
            </div>
            <form class="form-horizontal" id="updateform" >
                <div class="modal-body">
					<input id="id" name="id"   type="hidden">
																													<div class="form-group">
								<label class="col-sm-3 control-label">标题：</label>
								<div class="col-sm-8">
									<input id="title_" name="title" class="form-control" type="text">
								</div>
							</div>
																								<div class="form-group">
								<label class="col-sm-3 control-label">出版社：</label>
								<div class="col-sm-8">
									<input id="publisher_" name="publisher" class="form-control" type="text">
								</div>
							</div>
																								<div class="form-group">
								<label class="col-sm-3 control-label">出版时间：</label>
								<div class="col-sm-8">
									<input id="publishDate_" name="publishDate" class="form-control" type="text">
								</div>
							</div>
																								<div class="form-group">
								<label class="col-sm-3 control-label">作者：</label>
								<div class="col-sm-8">
									<input id="author_" name="author" class="form-control" type="text">
								</div>
							</div>
																								<div class="form-group">
								<label class="col-sm-3 control-label">isbn号：</label>
								<div class="col-sm-8">
									<input id="isbn_" name="isbn" class="form-control" type="text">
								</div>
							</div>
																								<div class="form-group">
								<label class="col-sm-3 control-label">索书号：</label>
								<div class="col-sm-8">
									<input id="callno_" name="callno" class="form-control" type="text">
								</div>
							</div>
																								<div class="form-group">
								<label class="col-sm-3 control-label">分类号：</label>
								<div class="col-sm-8">
									<input id="classno_" name="classno" class="form-control" type="text">
								</div>
							</div>
																								<div class="form-group">
								<label class="col-sm-3 control-label">馆藏数目：</label>
								<div class="col-sm-8">
									<input id="assetCount_" name="assetCount" class="form-control" type="text">
								</div>
							</div>
																								<div class="form-group">
								<label class="col-sm-3 control-label">书目metaid：</label>
								<div class="col-sm-8">
									<input id="metaid_" name="metaid" class="form-control" type="text">
								</div>
							</div>
																								<div class="form-group">
								<label class="col-sm-3 control-label">书目metatable：</label>
								<div class="col-sm-8">
									<input id="metatable_" name="metatable" class="form-control" type="text">
								</div>
							</div>
																								<div class="form-group">
								<label class="col-sm-3 control-label">原分馆：</label>
								<div class="col-sm-8">
									<input id="sublib_" name="sublib" class="form-control" type="text">
								</div>
							</div>
																								<div class="form-group">
								<label class="col-sm-3 control-label">原馆藏地点：</label>
								<div class="col-sm-8">
									<input id="local_" name="local" class="form-control" type="text">
								</div>
							</div>
																								<div class="form-group">
								<label class="col-sm-3 control-label">当前分馆：</label>
								<div class="col-sm-8">
									<input id="cursublib_" name="cursublib" class="form-control" type="text">
								</div>
							</div>
																								<div class="form-group">
								<label class="col-sm-3 control-label">当前馆藏地点：</label>
								<div class="col-sm-8">
									<input id="curlocal_" name="curlocal" class="form-control" type="text">
								</div>
							</div>
																								<div class="form-group">
								<label class="col-sm-3 control-label">价格（单位：分）：</label>
								<div class="col-sm-8">
									<input id="price_" name="price" class="form-control" type="text">
								</div>
							</div>
											                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭
                    </button>
                    <button type="submit" id="update" class="btn btn-primary">
                        确认修改
                    </button>
                </div>
            </form>
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
    <!--shiro控制bootstraptable行内按钮看见性 来自cflworks的创新方案 -->
    <div>
        <script type="text/javascript">
            var s_edit_h = 'hidden';
            var s_remove_h = 'hidden';
            var s_resetPwd_h = 'hidden';
        </script>
    </div>
    <div shiro:hasPermission="cflwork:collectionBook:edit">
        <script type="text/javascript">
            s_edit_h = '';
        </script>
    </div>
    <div shiro:hasPermission="cflwork:collectionBook:remove">
        <script type="text/javascript">
            var s_remove_h = '';
        </script>
    </div>
    <div shiro:hasPermission="cflwork:collectionBook:resetPwd">
        <script type="text/javascript">
            var s_resetPwd_h = '';
        </script>
    </div>
</div>
<div th:include="includes :: footer"></div>
<script src="/js/appjs/collectionBook/collectionBook.js"></script>
</body>
</html>
